(function($, doc) {
	mui.init();
	var userinfo = app.getState();
	var uid = userinfo.user_id;
	$.plusReady(function() {
		// 扩展API加载完毕，现在可以正常调用扩展API
		var header = document.querySelector('header.mui-bar');
				var list = document.getElementById('list');
				//calc hieght
				list.style.height = (plus.display.resolutionHeight - header.offsetHeight) + 'px';
				//create
				window.indexedList = new mui.IndexedList(list);
		var phones = sysphone.getPhonePin();
		document.querySelector("#area-list").innerHTML = template('list-template', {
				"flist": phones
		});
		mui("#area-list").on("tap", ".mui-indexed-list-item", function() {
			var fname = this.innerText;
			var phone = this.getAttribute("phone");
			var fid = this.getAttribute("fid");
			var head = this.getAttribute("head");
			//var fname = this.getAttribute("title");
			var phone = this.getAttribute("phone");
			var targets = '/pages/user/other_detail.html';
			mui.openWindow({
				url: targets,
				id: targets,
				extras: {
					fid: fid,
					head: head,
					fname: fname,
					phone: phone
				}
			});

		});
	});

}(mui, document));